<template>
  <div>
    <div class="mui-numbox" data-numbox-min='1' style="height: 25px">						
			<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
			<input id="test" class="mui-input-numbox" @change="numchange" ref="numbox" type="number" :value="initcount" />
			<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
		</div>
  </div>
</template>

<script>

import mui from '../../lib/mui/js/mui.min.js'

import { Toast } from 'mint-ui';

export default {
  mounted() {
    mui('.mui-numbox').numbox();
  },
  methods: {
    numchange() {
      this.$store.commit('seleteGoodsCount', {
        id: this.goodsId,
        count: this.$refs.numbox.value
      })
		}
  },
  props: ['initcount', 'goodsId']
};
</script>

<style>
</style>
